//
//  UIButton+Exension.swift
//  LBNewWeiBo
//
//  Created by bin on 15/11/1.
//  Copyright © 2015年 bin. All rights reserved.
//

import UIKit

/// 按钮的扩展：快速创建按钮
extension UIButton {
    
    convenience init( imageName: String, title: String,fontsize: CGFloat,color: UIColor) {
    
        self.init()
       setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitle(title, forState: UIControlState.Normal)
        
        // 设置字体大小
        titleLabel?.font = UIFont.systemFontOfSize(fontsize)
        setTitleColor(color, forState: UIControlState.Normal)
    }
    
}
